package cn.ds.assets.module.assets.controller.admin.metadataJobCollect.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.ds.assets.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 元数据管理-元数据采集作业 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BaseMetadataJobCollectBaseVO {

    @Schema(description = "作业名称", example = "芋艿")
    private String jobName;

    @Schema(description = "数据源ID,关联assets_metadata_datasource表id字段", example = "11837")
    private Long sourceId;

    @Schema(description = "执行时间(cron表达式)")
    private String cron;

    @Schema(description = "单次执行时长上限,单位:秒")
    private Integer timeout;

    @Schema(description = "作业生效时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startTime;

    @Schema(description = "作业失效时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    @Schema(description = "作业编码")
    private String jobCode;

    @Schema(description = "数据形态,1.指标,2.字段,3.表,4.数据库,5.应用,6.模型")
    private Byte dataForm;

    @Schema(description = "数据表,data_form字段值为1,2,3时必填")
    private String dataTable;

    @Schema(description = "项目空间ID,关联assets_project的id字段", example = "25045")
    private Long projectId;

    @Schema(description = "数据对象,,data_form字段值为1,2时必填")
    private String dataObj;

}
